{% extends 'form_div_layout.html.twig' %}

{% block form_widget %}
{% spaceless %}
    <ul {{ block('widget_container_attributes') }} class="list">
        {{ block('field_rows') }}
        {{ form_rest(form) }}
    </ul>
{% endspaceless %}
{% endblock form_widget %}

{% block field_row %}
{% spaceless %}
    <li>
        {{ form_label(form, label|default(null)) }}
        {{ form_widget(form) }}
        {{ form_errors(form) }}
    </li>
{% endspaceless %}
{% endblock field_row %}

{% block generic_label %}
{% spaceless %}
    <label {% for attrname,attrvalue in attr %} {{attrname}}="{{attrvalue}}"{% endfor %} >
        {{ label }}
        {% if required %}<span class="required" title="This field is required">*</span>{% endif %}
    </label>
{% endspaceless %}
{% endblock %}



{% block field_errors %}
{% spaceless %}
    {% if errors|length > 0 %}
    <ul class="validationErrors">
        {% for error in errors %}
            <li class="formValidationError">{{ error.messageTemplate }}</li>
        {% endfor %}
    </ul>
    {% endif %}
{% endspaceless %}
{% endblock field_errors %}


{% block form_row %}
{% spaceless %}
    <li>
        {{ form_label(form, label|default(null)) }}
        {{ form_widget(form) }}
    </li>
{% endspaceless %}
{% endblock form_row %}
